package main

import "strings"

func main() {
	str := "I love my work and I love my family!"
	ret := strings.Split(str, " ")
	for _, item := range ret {
		println(item)
	}

	//判斷字符串結束標記
	flg := strings.HasSuffix(str, "!") //判斷是否以"!"結尾
	println(flg)

	flg = strings.HasPrefix(str, "I") //判斷是否以"I"開頭
	println(flg)
}
